home *** CD-ROM | disk | FTP | other *** search
- /* Overview.rexx, 11.08.95 Jörg Richter */
- /* Stil 2 */
-
- OPTIONS RESULTS
-
- thumbsize = 126
-
- ADDRESS DataBase
-
- GetMaskSize
- width = WORD(result,1)
- height = WORD(result,2)
- IF WORDS(size) = 3 THEN
- depth = WORD(size,3)
- ELSE
- depth = 8
-
- xoff = (width-((width%thumbsize)*thumbsize))%2-12
- yoff = (height-((height%thumbsize)*thumbsize))%2-12
-
- IF depth = 8 THEN
- LoadGadgets "PicBase/IdxGadgets/"
- ELSE
- LoadGadgets "PicBase/IdxGadgetsGray/"
-
- doit = 1
- stext = "Bitte wählen Sie ..."
-
- DO FOREVER
- IF doit = 1 THEN DO
- Current
- nr = result
- CALL Overview
- END
- WaitCommand stext
- command = result
- stext = "Bitte wählen Sie ..."
- doit = 0
- IF WORDS(command) > 1 THEN DO
- mx = WORD(command,1)
- my = WORD(command,2)
- qual = WORD(command,3)
- Current
- ds = result
- IF qual = 10 THEN DO /* Gadget */
- IF mx = 1 THEN DO /* <- */
- nr = nr - (width%thumbsize)*(height%thumbsize)
- IF nr < 1 THEN nr = 1
- Goto nr
- doit = 1
- END
- IF mx = 2 THEN /* -> */
- doit = 1
- IF mx = 8 THEN DO /* Abbruch */
- Goto nr
- Call Cancel
- END
- IF mx > 2 THEN DO
- WaitCommand "Bitte wählen Sie das Bild aus ..."
- command = result
- IF WORDS(command) > 1 THEN DO
- IF mx = 3 THEN qual = 0
- IF mx = 4 THEN qual = 2
- IF mx = 6 THEN qual = 3 /* DTP */
- IF mx = 5 THEN qual = 9 /* Info */
- IF mx = 7 THEN qual = 1
- mx = WORD(command,1)
- my = WORD(command,2)
- END
- END
- END
- IF qual < 10 THEN DO
- select = nr + (mx-xoff-12)%thumbsize + ((my-yoff-12)%(thumbsize+28))*(width%thumbsize)
- Goto select
- IF qual = 1 THEN /* SHIFT */
- Call Cancel
- ELSE DO
- IF qual = 0 THEN
- Execute 1
- IF qual = 3 THEN DO
- GetData $F1
- data = result
- pos = LastPos("/",data)
- CopyToClip LEFT(data,pos) || D2C(10) || SubStr(data,pos+1,Length(data)-pos)
- stext = "Bildname ins ClipBoard kopiert"
- END
- IF qual = 9 THEN DO
- GetData $F1
- fname = result
- GetData $F2
- fsize = result
- GetData $F3
- psize = result
- stext = fname || " (" || fsize || " KBytes, " || psize || ")"
- /* stext = "Dateilänge: " || fsize || " KBytes Bildgröße: " || psize */
- END
- IF qual = 2 THEN DO /* CTRL */
- GetData $F1
- fname = result
- Mark
- xx = ((mx-xoff-12)%thumbsize)*thumbsize+xoff + 12
- yy = ((my-yoff-12)%(thumbsize+28))*(thumbsize+28)+yoff + 12
- IsMarked
- IF RC = 5 THEN DO
- Box xx yy thumbsize-1 thumbsize-1 1000
- color = 1
- stext = "Bild demarkiert"
- END
- ELSE DO
- Box xx yy thumbsize-1 thumbsize-1 1001
- color = 3
- stext = "Bild markiert"
- END
- fpos = MAX(LastPos("/",fname),LastPos(":",fname))
- fname = UPPER(SubStr(fname,fpos+1,Length(fname)-fpos))
- SetFont Helvetica.font 11 0
- Text xx+1 yy+thumbsize+10 color LEFT fname
- SetFont RESET 0
- END
- Goto ds
- END
- END
- END
- ELSE DO
- IF command = 27 | command = 0 THEN DO /* ESC */
- Goto nr
- Call Cancel
- END
- IF command = 79 THEN DO /* <- */
- nr = nr - (width%thumbsize)*(height%thumbsize)
- IF nr < 1 THEN nr = 1
- Goto nr
- doit = 1
- END
- IF command = 78 | command = 32 THEN /* -> */
- doit = 1
- END
- END
-
- EXIT
-
-
- ShowPicture:
-
- ARG xx yy .
- GetData $F1
- fname = result
- GetData $F4
- name = result
- IsMarked
- IF RC = 0 THEN DO
- Box xx+12 yy+12 thumbsize-1 thumbsize-1 1001
- color = 3
- END
- ELSE DO
- Box xx+12 yy+12 thumbsize-1 thumbsize-1 1000
- color = 1
- END
- LoadPic name xx yy CENTER
- fpos = MAX(LastPos("/",fname),LastPos(":",fname))
- fname = UPPER(SubStr(fname,fpos+1,Length(fname)-fpos))
- SetFont Helvetica.font 11 0
- Text xx+13 yy+thumbsize+22 color LEFT fname
- SetFont RESET 0
-
-
- RETURN
-
- Overview:
-
- Display On
- ClearMask
- Display Off
- x = xoff
- y = yoff
-
- weiter = 1
- DO WHILE weiter = 1
- CALL ShowPicture x y
- x = x + thumbsize
- IF x > width-thumbsize THEN DO
- IF y < height-(thumbsize*2)-28 THEN DO
- x = xoff
- y = y + thumbsize + 28
- END
- ELSE
- weiter = 0
- END
- RightOne
- IF RC ~= 0 THEN
- weiter = 0
- END
- RETURN
-
-
- Cancel:
-
- Display On
- LoadGadgets RESET
- Show NEW
- EXIT
-
-